<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    section {
      color: gray;
    }

    @supports(--css: variables) {
      section {
        --my-color: blue;
        color: var(--my-color, 'blue');
      }
    }

    h1 {
      text-align: center;
      max-width: 600px;
      margin: 50px auto;
    }
  </style>
</head>
<body>
  <section>
    <h1>If your browser supports CSS variables, this text will be blue, otherwise it will be gray.</h1>
  </section>
</body>
</html>